package com.lnb.common.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liaoningbo
 * @since 2024-01-11
 */
@Data
@Accessors(chain = true)
public class BaseEntity implements Serializable {

    public static final Integer STATUS_NORMAL = 1;
    public static final Integer STATUS_DETAIL = -1;
    /**
     * 主键id，也就是用户id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 数据状态;1:正常 -1:删除
     */
    @TableField(value = "status")
    @TableLogic(value = "1", delval = "-1")
    private Integer status;

    /**
     * 创建人id
     */
    @TableField(value = "create_user_id", fill = FieldFill.INSERT)
    private Long createUserId;

    /**
     * 创建人
     */
    @TableField(value = "create_user_name", fill = FieldFill.INSERT)
    private String createUserName;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField(value = "update_user_id", fill = FieldFill.INSERT_UPDATE)
    private Long updateUserId;

    /**
     * 修改人
     */
    @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
